package be.jas.mvc.base.model.fam;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: jasmien
 * Date: 11/07/13
 * Time: 13:59
 * To change this template use File | Settings | File Templates.
 */
public class FamManager extends AbstractReasoner {

    private Map<String, FamPerspective> perspectiveMap;


    public FamManager() {
        super("FamManager", "Manager");
        perspectiveMap = new HashMap<String, FamPerspective>();

    }

    public void addPerspective(FamPerspective famPerspective){
        this.perspectiveMap.put(famPerspective.getId(), famPerspective);
    }



    public FamPerspective getPerspective(String id){
        return this.perspectiveMap.get(id);
    }



    @Override
    public String toString(){
        String ret = "FamManager " + super.toString() + "\n";
        ret += "Perspectives:\n";
        for(Map.Entry<String, FamPerspective> entry : perspectiveMap.entrySet()){
            ret += entry.getValue().toString("\t") + "\n";
        }
        return ret;
    }

    public Collection<FamPerspective> getPerspectives(){
        return perspectiveMap.values();
    }
}
